home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / g_man / cat3 / OpenGL / glfeedbackbuffer.z / glfeedbackbuffer
Encoding:
Text File  |  1998-10-20  |  14.9 KB  |  265 lines

  1.  
  2.  
  3.  
  4. ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))           OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee           ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr - controls feedback mode
  10.  
  11.  
  12. CCCC SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      void ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr( GLsizei _s_i_z_e,
  14.                             GLenum _t_y_p_e,
  15.                             GLfloat *_b_u_f_f_e_r )
  16.  
  17.  
  18. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  19.      _s_i_z_e    Specifies the maximum number of values that can be written into
  20.              _b_u_f_f_e_r.
  21.  
  22.      _t_y_p_e    Specifies a symbolic constant that describes the information that
  23.              will be returned for each vertex.  GGGGLLLL____2222DDDD, GGGGLLLL____3333DDDD, GGGGLLLL____3333DDDD____CCCCOOOOLLLLOOOORRRR,
  24.              GGGGLLLL____3333DDDD____CCCCOOOOLLLLOOOORRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE, and GGGGLLLL____4444DDDD____CCCCOOOOLLLLOOOORRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE are accepted.
  25.  
  26.      _b_u_f_f_e_r  Returns the feedback data.
  27.  
  28. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  29.      The ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr function controls feedback.  Feedback, like
  30.      selection, is a GL mode.  The mode is selected by calling ggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee
  31.      with GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK.  When the GL is in feedback mode, no pixels are
  32.      produced by rasterization.  Instead, information about primitives that
  33.      would have been rasterized is fed back to the application using the GL.
  34.  
  35.      ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr has three arguments:  _b_u_f_f_e_r is a pointer to an array of
  36.      floating-point values into which feedback information is placed.  _s_i_z_e
  37.      indicates the size of the array.  _t_y_p_e is a symbolic constant describing
  38.      the information that is fed back for each vertex.  ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr must
  39.      be issued before feedback mode is enabled (by calling ggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee with
  40.      argument GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK).  Setting GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK without establishing the
  41.      feedback buffer, or calling ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr while the GL is in feedback
  42.      mode, is an error.
  43.  
  44.      When ggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee is called while in feedback mode, it returns the number
  45.      of entries placed in the feedback array, and resets the feedback array
  46.      pointer to the base of the feedback buffer. The returned value never
  47.      exceeds _s_i_z_e. If the feedback data required more room than was available
  48.      in _b_u_f_f_e_r, ggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee returns a -1.  To take the GL out of feedback
  49.      mode, call ggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee with a parameter value other than GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK.
  50.  
  51.      While in feedback mode, each primitive, bitmap, or pixel rectangle that
  52.      would be rasterized generates a block of values that are copied into the
  53.      feedback array.  If doing so would cause the number of entries to exceed
  54.      the maximum, the block is partially written so as to fill the array (if
  55.      there is any room left at all), and an overflow flag is set.  Each block
  56.      begins with a code indicating the primitive type, followed by values that
  57.      describe the primitive's vertices and associated data.  Entries are also
  58.      written for bitmaps and pixel rectangles.  Feedback occurs after polygon
  59.      culling and ggggllllPPPPoooollllyyyyggggoooonnnnMMMMooooddddeeee interpretation of polygons has taken place, so
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))           OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee           ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      polygons that are culled are not returned in the feedback buffer.  It can
  75.      also occur after polygons with more than three edges are broken up into
  76.      triangles, if the GL implementation renders polygons by performing this
  77.      decomposition.
  78.  
  79.      The ggggllllPPPPaaaassssssssTTTThhhhrrrroooouuuugggghhhh command can be used to insert a marker into the
  80.      feedback buffer.  See ggggllllPPPPaaaassssssssTTTThhhhrrrroooouuuugggghhhh.
  81.  
  82.      Following is the grammar for the blocks of values written into the
  83.      feedback buffer.  Each primitive is indicated with a unique identifying
  84.      value followed by some number of vertices.  Polygon entries include an
  85.      integer value indicating how many vertices follow.  A vertex is fed back
  86.      as some number of floating-point values, as determined by _t_y_p_e.  Colors
  87.      are fed back as four values in RGBA mode and one value in color index
  88.      mode.
  89.  
  90.           feedbackList <- feedbackItem feedbackList | feedbackItem
  91.  
  92.           feedbackItem <- point | lineSegment | polygon | bitmap |
  93.           pixelRectangle | passThru
  94.  
  95.           point <- GGGGLLLL____PPPPOOOOIIIINNNNTTTT____TTTTOOOOKKKKEEEENNNN vertex
  96.  
  97.           lineSegment <- GGGGLLLL____LLLLIIIINNNNEEEE____TTTTOOOOKKKKEEEENNNN vertex vertex | GGGGLLLL____LLLLIIIINNNNEEEE____RRRREEEESSSSEEEETTTT____TTTTOOOOKKKKEEEENNNN
  98.           vertex vertex
  99.  
  100.           polygon <- GGGGLLLL____PPPPOOOOLLLLYYYYGGGGOOOONNNN____TTTTOOOOKKKKEEEENNNN n polySpec
  101.  
  102.           polySpec <- polySpec vertex | vertex vertex vertex
  103.  
  104.           bitmap <- GGGGLLLL____BBBBIIIITTTTMMMMAAAAPPPP____TTTTOOOOKKKKEEEENNNN vertex
  105.  
  106.           pixelRectangle <- GGGGLLLL____DDDDRRRRAAAAWWWW____PPPPIIIIXXXXEEEELLLL____TTTTOOOOKKKKEEEENNNN vertex | GGGGLLLL____CCCCOOOOPPPPYYYY____PPPPIIIIXXXXEEEELLLL____TTTTOOOOKKKKEEEENNNN
  107.           vertex
  108.  
  109.           passThru <- GGGGLLLL____PPPPAAAASSSSSSSS____TTTTHHHHRRRROOOOUUUUGGGGHHHH____TTTTOOOOKKKKEEEENNNN value
  110.  
  111.           vertex <- 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture
  112.  
  113.           2d <- value value
  114.  
  115.           3d <- value value value
  116.  
  117.           3dColor  <- value value value color
  118.  
  119.           3dColorTexture <- value value value color tex
  120.  
  121.           4dColorTexture <- value value value value color tex
  122.  
  123.           color <- rgba | index
  124.  
  125.           rgba <- value value value value
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))           OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee           ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))
  137.  
  138.  
  139.  
  140.           index <- value
  141.  
  142.           tex <- value value value value
  143.  
  144.  
  145.      _v_a_l_u_e is a floating-point number, and _n is a floating-point integer
  146.      giving the number of vertices in the polygon.  GGGGLLLL____PPPPOOOOIIIINNNNTTTT____TTTTOOOOKKKKEEEENNNN,
  147.      GGGGLLLL____LLLLIIIINNNNEEEE____TTTTOOOOKKKKEEEENNNN, GGGGLLLL____LLLLIIIINNNNEEEE____RRRREEEESSSSEEEETTTT____TTTTOOOOKKKKEEEENNNN, GGGGLLLL____PPPPOOOOLLLLYYYYGGGGOOOONNNN____TTTTOOOOKKKKEEEENNNN, GGGGLLLL____BBBBIIIITTTTMMMMAAAAPPPP____TTTTOOOOKKKKEEEENNNN,
  148.      GGGGLLLL____DDDDRRRRAAAAWWWW____PPPPIIIIXXXXEEEELLLL____TTTTOOOOKKKKEEEENNNN, GGGGLLLL____CCCCOOOOPPPPYYYY____PPPPIIIIXXXXEEEELLLL____TTTTOOOOKKKKEEEENNNN and GGGGLLLL____PPPPAAAASSSSSSSS____TTTTHHHHRRRROOOOUUUUGGGGHHHH____TTTTOOOOKKKKEEEENNNN are
  149.      symbolic floating-point constants.  GGGGLLLL____LLLLIIIINNNNEEEE____RRRREEEESSSSEEEETTTT____TTTTOOOOKKKKEEEENNNN is returned
  150.      whenever the line stipple pattern is reset.  The data returned as a
  151.      vertex depends on the feedback _t_y_p_e.
  152.  
  153.      The following table gives the correspondence between _t_y_p_e and the number
  154.      of values per vertex.  _k is 1 in color index mode and 4 in RGBA mode.
  155.  
  156.           _t_y_p_e           _c_o_o_r_d_i_n_a_t_e_s   _c_o_l_o_r   _t_e_x_t_u_r_e   _t_o_t_a_l _n_u_m_b_e_r _o_f _v_a_l_u_e_s
  157.    ____________________________________________________________________________
  158.           GGGGLLLL____2222DDDD             _x, _y                                   2
  159.           GGGGLLLL____3333DDDD            _x, _y, _z                                 3
  160.        GGGGLLLL____3333DDDD____CCCCOOOOLLLLOOOORRRR         _x, _y, _z       k                        3+k
  161.    GGGGLLLL____3333DDDD____CCCCOOOOLLLLOOOORRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE    _x, _y, _z,       k        4               7+k
  162.    GGGGLLLL____4444DDDD____CCCCOOOOLLLLOOOORRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE   _x, _y, _z, _w      k        4               8+k
  163.  
  164.  
  165.      Feedback vertex coordinates are in window coordinates, except _w, which is
  166.      in clip coordinates.  Feedback colors are lighted, if lighting is
  167.      enabled.  Feedback texture coordinates are generated, if texture
  168.      coordinate generation is enabled.  They are always transformed by the
  169.      texture matrix.
  170.  
  171. NNNNOOOOTTTTEEEESSSS
  172.      ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr, when used in a display list, is not compiled into the
  173.      display list but is executed immediately.
  174.  
  175. EEEERRRRRRRROOOORRRRSSSS
  176.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_y_p_e is not an accepted value.
  177.  
  178.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _s_i_z_e is negative.
  179.  
  180.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr is called while the
  181.      render mode is GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK, or if ggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee is called with argument
  182.      GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK before ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr is called at least once.
  183.  
  184.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr is executed between
  185.      the execution of ggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of ggggllllEEEEnnnndddd.
  186.  
  187. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  188.      ggggllllGGGGeeeetttt with argument GGGGLLLL____RRRREEEENNNNDDDDEEEERRRR____MMMMOOOODDDDEEEE
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))           OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee           ggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))
  203.  
  204.  
  205.  
  206. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  207.      ggggllllBBBBeeeeggggiiiinnnn, ggggllllLLLLiiiinnnneeeeSSSSttttiiiipppppppplllleeee, ggggllllPPPPaaaassssssssTTTThhhhrrrroooouuuugggghhhh, ggggllllPPPPoooollllyyyyggggoooonnnnMMMMooooddddeeee, ggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee,
  208.      ggggllllSSSSeeeelllleeeeccccttttBBBBuuuuffffffffeeeerrrr
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.